<%@ Language=VBScript %> <% Dim numero numero = Int(Request("numero")) if numero = 0 then numero = 8 end if Dim busqueda busqueda = Request("busqueda") %> <% HomeAccion=6%>
 

 
OFERTAS

<% dim conexion, cadena, SQL dim record set conexion = Server.CreateObject("ADODB.connection") set record = Server.CreateObject("ADODB.Recordset") conexion.ConnectionString = Application("conexion") conexion.Open SQL = "Select * from Familia order by nombrefamilia" record.Open SQL,conexion,3,1 while record.EOF <> true and record.BOF <> true cadena = "" cadena = cadena & "" cadena = cadena & "" Dim nfam nfam = record("NombreFamilia") Response.Write cadena record.MoveNext wend record.Close %>
SECCIONES
 ·" + record("NombreFamilia") + "

<% if Session("cesta") <> "" then %>

 Ver Carrito
<%end if%>

"> ">
Búsqueda general de productos:
<% if Request("busqueda")="true" then Response.Write ("RESULTADO DE BÚSQUEDA") else Response.Write Ucase(Request("nombre")) end if %>
<% familia=Request("familia") if busqueda = "true" then cadenas = Request("cadenas") SQL = "select * from productos where NombreProducto like" & "'%" & cadenas & "%' order by NombreProducto" else SQL = "select * from productos where Idfamilia = " & familia & " order by NombreProducto" end if record.Open SQL,conexion,3,1 i = 0 while i < (numero - 8) record.MoveNext i = i + 1 wend while record.EOF <> true and record.BOF <> true and i < numero if (aux Mod 2) = 0 then Response.Write "" end if %> <% if (aux Mod 2) <> 0 then Response.Write "" end if record.MoveNext aux = aux + 1 i = i + 1 wend if record.RecordCount = i and i = 8 then i = 0 end if %>
')"><%IF record("Foto")<>"" THEN%> " height="40" width="60" border="0" class="imagen"><%ELSE%> <%END IF%> <% Response.Write record("NombreProducto") %>
Precio: <% Response.Write FormatNumber(Cstr(record("Precio"))) + " €/" + record("Presentacion")%>

','<%=record("activo")%>')" class="enlaces">
<% if request("busqueda")="true" then %>
Volver
<% end if tot=record.recordcount if i >= numero and i <= 8 then %> <%else %> <% if i => numero then %> <% else if i > 8 then %> <% end if end if%>
&busqueda=<%Response.Write busqueda%>&cadenas=<%Response.Write cadenas%>"><< 8 anteriores
Mostrados <%=tot%> productos
<%end if %>
<% record.Close conexion.Close set record = nothing set conexion = nothing %>